<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="UserGroupMaintain.aspx.vb" Inherits="WebForm_Manage_UserGroupMaintain" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table>
                <tr style="text-align: center;">
                    <td>
                        <asp:HiddenField ID="hiUID" runat="server" />
                        <asp:Label ID="lblTitle" runat="server"   SkinID="title" ></asp:Label>
                        <br />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lbUID" runat="server" meta:resourcekey="lblUID"></asp:Label>
                        <asp:TextBox ID="txtUID" runat="server" Width="100px" AutoPostBack="True"></asp:TextBox>
                        <asp:Button ID="btnUID" runat="server" Text="..." />
                        <asp:TextBox ID="txtUserName" runat="server" BackColor="#CCCCCC" ReadOnly="True"></asp:TextBox>
                        <br />
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnQuery" runat="server" meta:resourcekey="btnQuery" />
                        <TServerControl:TGridView ID="gvGruopID" runat="server" AllowHoverEffect="False"
                            AllowHoverSelect="False" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="objDSGroupID"
                            ShowFooterWhenEmpty="False" ShowHeaderWhenEmpty="True" SkinID="pager" TotalRowCount="0"
                            DataKeyNames="GroupID" Visible="False">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Button ID="btnEdit" CommandName="Edit" runat="server" meta:resourcekey="btnEdit"
                                            Visible='<%# Eval("canModi") %>' />
                                        <asp:Button ID="btnDelete" CommandName="Delete" runat="server" meta:resourcekey="btnDelete"
                                            Visible='<%# Eval("canDelete") %>' />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Button ID="btnUpdate" CommandName="Update" runat="server" meta:resourcekey="btnUpdate" />
                                        <asp:Button ID="btnCancel" CommandName="Cancel" runat="server" meta:resourcekey="btnCancel" />
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="GroupID">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="ddlGroupID" runat="server" AutoPostBack="True" DataSourceID="objDSGroupIDInsertDT"
                                            DataTextField="GroupName" DataValueField="GroupID" SelectedValue='<%# Bind("GroupID") %>'>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblGroupName" runat="server" Text='<%# Bind("GroupName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </TServerControl:TGridView>
                        <asp:HiddenField ID="hiDBName" runat="server" />
                        <asp:ObjectDataSource ID="objDSGroupID" runat="server" DeleteMethod="DeleteGroupMember"
                            SelectMethod="GetGroupIDByUID" TypeName="OAMS.BBL.GroupBBL" UpdateMethod="InsertGroupMember">
                            <DeleteParameters>
                                <asp:Parameter Name="GroupID" Type="String" />
                                <asp:ControlParameter ControlID="txtUID" Name="UID1" PropertyName="Text" Type="String" />
                                <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="GroupID" Type="String" />
                                <asp:ControlParameter ControlID="txtUID" Name="UID1" PropertyName="Text" Type="String" />
                                <asp:ControlParameter ControlID="hiUID" Name="CrtUID" PropertyName="Value" Type="String" />
                                <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                            </UpdateParameters>
                            <SelectParameters>
                                <asp:ControlParameter ControlID="txtUID" Name="UID" PropertyName="Text" Type="String"
                                    ConvertEmptyStringToNull="False" />
                                <asp:ControlParameter ControlID="hiDBName" ConvertEmptyStringToNull="False" Name="dbName"
                                    PropertyName="Value" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                        <asp:ObjectDataSource ID="objDSGroupIDInsertDT" runat="server" SelectMethod="GetGroupIDInsert"
                            TypeName="OAMS.BBL.GroupBBL">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
                        <br />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
